An image coding standard, such as MPEG (Moving Picture Experts Group) or ITU-T H.26×, includes the steps of dividing each frame into a plurality of square blocks each of which consists of 16×16 pixels of a luminance signal (contains 8×8 pixels of a chrominance difference signal), which is called a macroblock, estimating a movement with respect to a reference frame by performing a motion compensated prediction for each of the plurality of macroblocks, and coding both a signal (i.e., a predictive residual signal) corresponding to an estimated error and motion vector information. Furthermore, in the case of MPEG-2, there has been provided a technique for dividing each macroblock into two field regions and performing a motion prediction for each of the two field regions. In the case of H.263 and MPEG-4, there has been provided a technique for dividing each macroblock into four 8×8 pixel subblocks and performing a motion prediction for each of the four 8×8 pixel subblocks. Particularly, in the case of MPEG-4, it is known that the adaptation of the size of blocks for motion predictions causes an increase in the amount of coded data about motion vectors, but provides an improvement in the traceability of more-violent and more-fine movements, and it can be expected that an appropriate mode selection provides an improvement in the performance of the image coding method.
Furthermore, the accuracy of motion vectors is provided as another technical aspect of motion compensated predictions. Although digital image data originally have only information about discrete pixels (referred to as integer pixels from here on) generated by sampling, a technique for producing virtual samples to be arranged among integer pixels by performing interpolation calculations, and for using those pixels as a predicted picture is used widely. It is known that this technique provides two advantages of improving the prediction accuracy by producing an increase in the number of candidate points for predictions, and of improving the prediction efficiency by reducing the number of singular points included in the predicted picture according to a filtering effect caused by the interpolation calculations. On the other hand, because it is necessary to improve the accuracy of motion vectors each of which represents the amount of movement as the accuracy of virtual samples is improved, it should be noted that the amount of codes of each motion vector is also increased.
In the case of MPEG-1 and MPEG-2, half pixel prediction that can accept up to ½-pixel accuracy as the accuracy of virtual samples is used. FIG. 1 shows generation of samples having ½-pixel accuracy. In the figure, A, B, C, and D denote integer pixels, respectively, and e, f, g, h, and i denote virtual samples having half-pixel accuracy, which are generated from the integer pixels A to D, respectively.e=(A+B)//2f=(C+D)//2g=(A+C)//2h=(B+D)//2i=(A+B+C+D)//4(// shows a division with rounding)
When this procedure for generating virtual samples having half-pixel accuracy is applied to a certain block, extra data about integer pixels that are placed outside of the block and are apart from the boundaries of the block by one pixel are needed. This is because it is necessary to calculate virtual samples that are placed outside of the block and are apart from the boundaries (i.e., the end integer pixels) of the block by one half pixel.
In the case of MPEG-4, ¼-pixel accuracy prediction using virtual samples having up to ¼-pixel accuracy is adopted. When using ¼-pixel accuracy prediction, after half-pixel samples are generated, samples having ¼-pixel accuracy are generated by using them. In order to suppress an excessive smoothing when half-pixel samples are generated, frequency components included in an original signal are maintained as much as possible by using a filter having a large number of taps. For example, when using ¼-pixel accuracy prediction according to MPEG-4, a virtual sample a having half-pixel accuracy, which is generated for generation of virtual samples having ¼-pixel accuracy, is generated by using eight pixels that are placed in the vicinity of the virtual sample a as follows. The following equation shows only a process of calculating a horizontal component of the virtual sample a having half-pixel accuracy, and a relationship between the virtual sample a having half-pixel accuracy, which is generated for generation of virtual samples having ¼-pixel accuracy, and the X components X−4 to X4 of integer pixels in the following equation is shown in FIG. 2.a=(COE1*X1+COE2*X2+COE3*X3+COE4*X4+COE−1*X−1+COE2*X2+COE−3*X−3+COE−4*X−4)//256(COEk shows a filter coefficient (the sum of all filter coefficients is 256), and // shows a division with rounding) When this procedure for generating virtual samples having ¼-pixel accuracy is applied to a certain block, extra data about integer pixels that are placed outside of the block and are apart from the boundaries of the block by one to four pixels are needed. This is because it is necessary to calculate virtual samples that are placed outside of the block and are apart from the boundaries (i.e., the end integer pixels) of the block by ¼ pixel.
However, a problem is that when calculating virtual samples at the boundaries a target block for prediction, because data about extra pixels that are placed outside of the target block, the number of pixels depending on the number of filter taps, are needed for filtering calculations, the memory bandwidth necessary for generation of a predicted image is increased according to the number of filter taps.
To solve this problem, particularly in ¼-pixel accuracy prediction according to MPEG-4, although a measure for reducing the number of pixels to be newly read, which is required for generating a predicted picture, by mirroring end pixels in the vicinity of the boundaries of a target block for prediction is installed, a natural filtering at the boundaries of the target block for prediction is prevented and the measure is therefore not preferable in view of the coding efficiency.
It is therefore an object of the present invention to provide an image coding apparatus, an image coding method, an image decoding apparatus, and an image decoding method that can improve the coding efficiency while reducing the memory bandwidth even when dividing each image frame, such as a macroblock, into small regions and individually performing a motion compensated prediction on each of the small regions, and a communication apparatus having at least one of the image coding apparatus and the image decoding apparatus.